﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainSite.Master" AutoEventWireup="true" CodeBehind="StrategicTargetlList.aspx.cs" Inherits="BSCMFF.Web.Pages.StrategicGoalList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" RestoreOriginalRenderDelegate="false">
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" 
            AutoGenerateEditColumn="True" DataSourceID="EntityDataSourceStrategicTargets" 
            GridLines="None"  AutoGenerateDeleteColumn="True" 
            OnItemDataBound="RadGrid1_ItemDataBound" 
            ondeletecommand="RadGrid1_DeleteCommand" 
            oninsertcommand="RadGrid1_InsertCommand" 
            onupdatecommand="RadGrid1_UpdateCommand">
            <MasterTableView DataKeyNames="Strategic_Target_ID"  CommandItemDisplay="Bottom"
                DataSourceID="EntityDataSourceStrategicTargets">
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px" />
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px" />
                </ExpandCollapseColumn>
                <Columns>
                    <%--<telerik:GridBoundColumn DataField="Strategic_Target_ID" 
                        DataType="System.Int32" HeaderText="Strategic_Target_ID" ReadOnly="True" 
                        SortExpression="Strategic_Target_ID" UniqueName="Strategic_Target_ID">
                    </telerik:GridBoundColumn>--%>
                    <telerik:GridBoundColumn DataField="Name" HeaderText="Name" 
                        SortExpression="Name" UniqueName="Name" >
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Description" HeaderText="Description" 
                        SortExpression="Description" UniqueName="Description">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Perspective.Name" DataType="System.Int32" 
                        HeaderText="Perspective" SortExpression="Perspective.Name" 
                        UniqueName="Perspective.Name">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Start_Value" DataType="System.Int32" 
                        HeaderText="Start_Value" SortExpression="Start_Value" UniqueName="Start_Value">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Start_Description" 
                        HeaderText="Start_Description" SortExpression="Start_Description" 
                        UniqueName="Start_Description">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Target_Value" DataType="System.Int32" 
                        HeaderText="Target_Value" SortExpression="Target_Value" 
                        UniqueName="Target_Value">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Target_Description" 
                        HeaderText="Target_Description" SortExpression="Target_Description" 
                        UniqueName="Target_Description">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="~/UserControls/Details/StrategicTargetDetails.ascx">
                </EditFormSettings>
            </MasterTableView>
            
            <HeaderContextMenu EnableAutoScroll="True">
            </HeaderContextMenu>
        </telerik:RadGrid>
        <asp:Label ID="l" runat="server" Text="tralal" />
    </telerik:RadAjaxPanel>
    
      
    <asp:EntityDataSource ID="EntityDataSourceStrategicTargets" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableDelete="True" EnableFlattening="False" EnableInsert="True" 
        EnableUpdate="True" EntitySetName="Strategic_Target" Include="Perspective">
    </asp:EntityDataSource>

    <asp:EntityDataSource ID="EntityDataSourcePerspectives" runat="server" 
        ConnectionString="name=BSCEntities" DefaultContainerName="BSCEntities" 
        EnableFlattening="False" EntitySetName="Perspectives" 
        Select="it.[Perspective_ID], it.[Name]">
    </asp:EntityDataSource>
</asp:Content>
